import request from "@/utils/request";

const api_name = `/api/user`;

export default {
  // qq邮箱登陆的验证码
  login(userInfo) {
    return request({
      url: `${api_name}/loginEmail`,
      method: `post`,
      data: userInfo,
    });
  },

  // 用户登录功能
  login(userInfo) {
    return request({
      url: `${api_name}/login`,
      method: `post`,
      data: userInfo,
    });
  },

  //  根据用户id 查询用户信息
  getUserInfo() {
    return request({
      url: `${api_name}/auth/getUserInfo`,
      method: `get`,
    });
  },
  //    用户认证
  saveUserAuah(userAuah) {
    return request({
      url: `${api_name}/auth/userAuth`,
      method: "post",
      data: userAuah,
    });
  },
};
